home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / dev / misc / gms_dev.lha / GMS / Source / Asm / Screens / HiResScreen.s < prev    next >
Encoding:
Text File  |  1997-07-09  |  2.2 KB  |  98 lines

  1. ;-------T-------T------------------------T---------------------------------;
  2. ;Name:      Hi-Resolution Screen Display
  3. ;Author:    Paul Manias
  4. ;Copyright: DreamWorld Productions (c) 1996-1997.  Freely distributable.
  5. ;
  6. ;Opens a screen in HIRES and LACED modes.  You can even try SuperHiRes
  7. ;(SHIRES) if you change the appropriate flag in the GameScreen structure.
  8.  
  9.     INCDIR    "INCLUDES:"
  10.     INCLUDE    "games/games_lib.i"
  11.     INCLUDE    "games/games.i"
  12.  
  13.     SECTION    "Demo",CODE
  14.  
  15. ;===========================================================================;
  16. ;                             INITIALISE DEMO
  17. ;===========================================================================;
  18.  
  19.     STARTGMS
  20.  
  21. Start:    MOVEM.L    A0-A6/D1-D7,-(SP)
  22.     move.l    GMSBase(pc),a6
  23.     lea    ScreenTags(pc),a0
  24.     CALL    AddScreen
  25.     tst.l    d0
  26.     beq.s    .Error_Screen
  27.  
  28.     move.l    Screen(pc),a0
  29.     lea    PictureTags(pc),a1
  30.     move.l    GS_MemPtr1(a0),PicData
  31.     CALL    LoadPic
  32.     tst.l    d0
  33.     beq.s    .Error_Picture
  34.  
  35.     move.l    Picture(pc),a1
  36.     move.l    PIC_Palette(a1),GS_Palette(a0)
  37.     CALL    UpdatePalette
  38.  
  39.     CALL    ShowScreen
  40.  
  41.     CALL    InitJoyPorts
  42.  
  43.     bsr.s    Main
  44.  
  45. .ReturnToDOS
  46.     move.l    GMSBase(pc),a6
  47.     move.l    Picture(pc),a1
  48.     CALL    FreePic
  49. .Error_Picture
  50.     move.l    GMSBase(pc),a6
  51.     move.l    Screen(pc),a0
  52.     CALL    DeleteScreen
  53. .Error_Screen
  54.     MOVEM.L    (SP)+,A0-A6/D1-D7
  55.     moveq    #ERR_OK,d0
  56.     rts
  57.  
  58. ;===========================================================================;
  59. ;                                MAIN LOOP
  60. ;===========================================================================;
  61.  
  62. Main:    CALL    WaitVBL
  63.     moveq    #JPORT1,d0
  64.     moveq    #JT_ZBXY,d1
  65.     CALL    ReadJoyPort
  66.     btst    #MB_LMB,d0
  67.     beq.s    Main
  68.     rts
  69.  
  70. ;===========================================================================;
  71. ;                                  DATA
  72. ;===========================================================================;
  73.  
  74. ScreenTags:
  75.     dc.l    TAGS_GAMESCREEN
  76. Screen:    dc.l    0
  77.     dc.l    GSA_AmtColours,16
  78.     dc.l    GSA_ScrWidth,640
  79.     dc.l    GSA_ScrHeight,256
  80.     dc.l    GSA_Attrib,CENTRE
  81.     dc.l    GSA_ScrMode,HIRES|LACED
  82.     dc.l    TAGEND
  83.  
  84. PictureTags:
  85.     dc.l    TAGS_PICTURE
  86. Picture    dc.l    0
  87.     dc.l    PCA_Data
  88. PicData    dc.l    0
  89.     dc.l    PCA_Width,640
  90.     dc.l    PCA_Height,256
  91.     dc.l    PCA_AmtColours,16
  92.     dc.l    PCA_Options,GETPALETTE
  93.     dc.l    PCA_File,.file
  94.     dc.l    TAGEND
  95.  
  96. .file    dc.b    "GMS:demos/data/PIC.Pic640x256",0
  97.     even
  98.